Integrand size = 20, antiderivative size = 254 \[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=-\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {6 d^3 \sin (a+b x)}{b^4}-\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2} \]
[Out]
Time = 0.27 (sec) , antiderivative size = 254, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4493, 3377, 2717, 4268, 2611, 6744, 2320, 6724} \[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=-\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {6 i d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {6 d^3 \sin (a+b x)}{b^4}-\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}+\frac {(c+d x)^3 \cos (a+b x)}{b} \]
[In]
[Out]
Rule 2320
Rule 2611
Rule 2717
Rule 3377
Rule 4268
Rule 4493
Rule 6724
Rule 6744
Rubi steps \begin{align*} \text {integral}& = \int (c+d x)^3 \csc (a+b x) \, dx-\int (c+d x)^3 \sin (a+b x) \, dx \\ & = -\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {(c+d x)^3 \cos (a+b x)}{b}-\frac {(3 d) \int (c+d x)^2 \cos (a+b x) \, dx}{b}-\frac {(3 d) \int (c+d x)^2 \log \left (1-e^{i (a+b x)}\right ) \, dx}{b}+\frac {(3 d) \int (c+d x)^2 \log \left (1+e^{i (a+b x)}\right ) \, dx}{b} \\ & = -\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {\left (6 i d^2\right ) \int (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (6 i d^2\right ) \int (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (6 d^2\right ) \int (c+d x) \sin (a+b x) \, dx}{b^2} \\ & = -\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}+\frac {\left (6 d^3\right ) \int \cos (a+b x) \, dx}{b^3}+\frac {\left (6 d^3\right ) \int \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right ) \, dx}{b^3}-\frac {\left (6 d^3\right ) \int \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right ) \, dx}{b^3} \\ & = -\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}+\frac {6 d^3 \sin (a+b x)}{b^4}-\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {\left (6 i d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4}+\frac {\left (6 i d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4} \\ & = -\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {6 d^3 \sin (a+b x)}{b^4}-\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2} \\ \end{align*}
Time = 0.87 (sec) , antiderivative size = 330, normalized size of antiderivative = 1.30 \[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=\frac {-2 b^3 (c+d x)^3 \text {arctanh}(\cos (a+b x)+i \sin (a+b x))+3 i d \left (b^2 (c+d x)^2 \operatorname {PolyLog}(2,-\cos (a+b x)-i \sin (a+b x))+2 i b d (c+d x) \operatorname {PolyLog}(3,-\cos (a+b x)-i \sin (a+b x))-2 d^2 \operatorname {PolyLog}(4,-\cos (a+b x)-i \sin (a+b x))\right )-3 i d \left (b^2 (c+d x)^2 \operatorname {PolyLog}(2,\cos (a+b x)+i \sin (a+b x))+2 i b d (c+d x) \operatorname {PolyLog}(3,\cos (a+b x)+i \sin (a+b x))-2 d^2 \operatorname {PolyLog}(4,\cos (a+b x)+i \sin (a+b x))\right )+\cos (b x) \left (b (c+d x) \left (-6 d^2+b^2 (c+d x)^2\right ) \cos (a)-3 d \left (-2 d^2+b^2 (c+d x)^2\right ) \sin (a)\right )-\left (3 d \left (-2 d^2+b^2 (c+d x)^2\right ) \cos (a)+b (c+d x) \left (-6 d^2+b^2 (c+d x)^2\right ) \sin (a)\right ) \sin (b x)}{b^4} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 846 vs. \(2 (236 ) = 472\).
Time = 1.79 (sec) , antiderivative size = 847, normalized size of antiderivative = 3.33
method | result | size |
risch | \(\frac {\left (d^{3} x^{3} b^{3}+3 b^{3} c \,d^{2} x^{2}-3 i b^{2} d^{3} x^{2}+3 b^{3} c^{2} d x -6 i b^{2} c \,d^{2} x +b^{3} c^{3}-3 i b^{2} c^{2} d -6 b \,d^{3} x -6 c \,d^{2} b +6 i d^{3}\right ) {\mathrm e}^{-i \left (x b +a \right )}}{2 b^{4}}+\frac {\left (d^{3} x^{3} b^{3}+3 b^{3} c \,d^{2} x^{2}+3 i b^{2} d^{3} x^{2}+3 b^{3} c^{2} d x +6 i b^{2} c \,d^{2} x +b^{3} c^{3}+3 i b^{2} c^{2} d -6 b \,d^{3} x -6 c \,d^{2} b -6 i d^{3}\right ) {\mathrm e}^{i \left (x b +a \right )}}{2 b^{4}}-\frac {2 c^{3} \operatorname {arctanh}\left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b}-\frac {6 i d^{3} \operatorname {polylog}\left (4, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{4}}+\frac {6 i d^{3} \operatorname {polylog}\left (4, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{4}}-\frac {6 i c \,d^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{2}}+\frac {6 i c \,d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{2}}+\frac {2 d^{3} a^{3} \operatorname {arctanh}\left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{4}}+\frac {6 d^{3} \operatorname {polylog}\left (3, {\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{3}}-\frac {6 d^{3} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{3}}+\frac {d^{3} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a^{3}}{b^{4}}-\frac {d^{3} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) a^{3}}{b^{4}}+\frac {d^{3} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x^{3}}{b}-\frac {d^{3} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x^{3}}{b}+\frac {6 c \,d^{2} \operatorname {polylog}\left (3, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}-\frac {6 c \,d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}-\frac {6 c \,d^{2} a^{2} \operatorname {arctanh}\left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}+\frac {6 c^{2} d a \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}+\frac {3 c^{2} d \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a}{b^{2}}-\frac {3 c^{2} d \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) a}{b^{2}}+\frac {3 c \,d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) a^{2}}{b^{3}}-\frac {3 i c^{2} d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}+\frac {3 i c^{2} d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {3 i d^{3} \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right ) x^{2}}{b^{2}}+\frac {3 i d^{3} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right ) x^{2}}{b^{2}}+\frac {3 c \,d^{2} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x^{2}}{b}-\frac {3 c \,d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x^{2}}{b}+\frac {3 c^{2} d \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b}-\frac {3 c^{2} d \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x}{b}-\frac {3 c \,d^{2} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a^{2}}{b^{3}}\) | \(847\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 925 vs. \(2 (230) = 460\).
Time = 0.32 (sec) , antiderivative size = 925, normalized size of antiderivative = 3.64 \[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=\int \left (c + d x\right )^{3} \cos {\left (a + b x \right )} \cot {\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 929 vs. \(2 (230) = 460\).
Time = 0.38 (sec) , antiderivative size = 929, normalized size of antiderivative = 3.66 \[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=\int { {\left (d x + c\right )}^{3} \cos \left (b x + a\right ) \cot \left (b x + a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx=\int \cos \left (a+b\,x\right )\,\mathrm {cot}\left (a+b\,x\right )\,{\left (c+d\,x\right )}^3 \,d x \]
[In]
[Out]